/**
 * Created by cz on 2017/5/4.
 */
import React,{Component} from "react";
import {
    View,
    Image,
    Text,
    StyleSheet,
    Navigator
}from "react-native";
import WelcomePage from "./WelcomePage"
function setup(){
    //进行一些初始化配置
    class Root extends Component{
        constructor(props){
            super(props);
        }
        renderFun(route,navigator){
            let Component = route.component;
            return <Component {...route.params} navigator={navigator} />
        }
        render(){
            return(
                    <Navigator
                        initialRoute={{name: WelcomePage,component:WelcomePage}}
                        renderScene={(route,navigator)=>this.renderFun(route,navigator)}
                    />
            )
        }
    }
    return <Root />
}
module.exports=setup;